home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Communications
/
General
/
Supra ARA1.0 2⁄23⁄94
/
SFM V32bis-S110=0
< prev
next >
Wrap
Text File
|
1993-03-22
|
3KB
|
202 lines
! "SFM V32bis-S110=0 - 3/22/93"
! Sets SFM for carrier of 9600 or <, hardware flow, serial port at 19.2
!
! 3/22/93 MAW - added pause to fix PB wakeup
@ORIGINATE
@ANSWER
!
@LABEL 1
serreset 19200, 0, 8, 1
!
! first recall the factory configuration, and get the modem in enhanced command state
!
! For SupraPB modems so that they wake up in time to receive commands
pause 30
matchclr
matchstr 1 4 "OK\13\10"
write "AT &F1 \\N0 &Q6 W1 S110=0 \13"
matchread 30
jump 59
!
! Next, Set up the configuration:
! Turn off auto answer and echo
!
@LABEL 4
pause 5
matchstr 1 6 "OK\13\10"
write "AT S0=0 E0 \13"
matchread 30
jump 59
!
! If speaker on flag is true,
!
@LABEL 6
ifstr 2 8 "1"
matchstr 1 8 "OK\13\10"
write "AT M0\13"
matchread 30
jump 59
!
! The modem is ready so enable answering, or originate a call
!
@LABEL 8
pause 5
ifANSWER 30
note "Dialing ^1" 3
write "AT S0=0 DT^1\13"
!
@LABEL 9
matchstr 1 11 "CARRIER 1200\13\10"
matchstr 2 12 "CARRIER 2400\13\10"
matchstr 3 13 "CARRIER 4800\13\10"
matchstr 4 14 "CARRIER 7200\13\10"
matchstr 5 15 "CARRIER 9600\13\10"
matchstr 6 16 "CARRIER 12000\13\10"
matchstr 7 17 "CARRIER 14400\13\10"
matchstr 8 50 "NO CARRIER\13\10"
matchstr 9 50 "ERROR\13\10"
matchstr 10 52 "NO DIALTONE\13\10"
matchstr 11 53 "BUSY\13\10"
matchstr 12 54 "NO ANSWER\13\10"
matchread 700
jump 59
!
@LABEL 11
note "Communicating at 1200 bps." 2
CommunicatingAt 1200
jump 20
!
@LABEL 12
note "Communicating at 2400 bps." 2
CommunicatingAt 2400
jump 20
!
@LABEL 13
note "Communicating at 4800 bps." 2
CommunicatingAt 4800
jump 20
!
@LABEL 14
note "Communicating at 7200 bps." 2
CommunicatingAt 7200
jump 20
!
@LABEL 15
note "Communicating at 9600 bps." 2
CommunicatingAt 9600
jump 20
!
@LABEL 16
note "Communicating at 12000 bps." 2
CommunicatingAt 12000
jump 20
!
@LABEL 17
note "Communicating at 14400 bps." 2
CommunicatingAt 14400
jump 20
!
! Now CONNECTed. Change to Hardware Handshaking
@LABEL 20
HSReset 0 1 0 0 0 0
ifANSWER 22
pause 30
!
! Finished. Return with good results
@LABEL 22
exit 0
!
! @ANSWER
! Set up the modem to answer
@LABEL 30
write "ATS0=1\13"
matchstr 1 31 "OK\13\10"
matchread 30
jump 59
!
@LABEL 31
matchstr 1 32 "RING\13\10"
matchstr 2 11 "CARRIER 1200\13\10"
matchstr 3 12 "CARRIER 2400\13\10"
matchstr 4 13 "CARRIER 4800\13\10"
matchstr 5 14 "CARRIER 7200\13\10"
matchstr 6 15 "CARRIER 9600\13\10"
matchstr 7 16 "CARRIER 12000\13\10"
matchstr 8 17 "CARRIER 14400\13\10"
matchstr 9 50 "NO CARRIER\13\10"
matchstr 10 50 "ERROR\13\10"
matchstr 11 52 "NO DIALTONE\13\10"
matchstr 12 53 "BUSY\13\10"
matchstr 13 54 "NO ANSWER\13\10"
matchread 700
jump 31
!
@LABEL 32
userhook 1
note "Answering phone…" 2
jump 31
!
! 50: error messages
!
@LABEL 50
exit -6021
!
@LABEL 52
exit -6020
!
@LABEL 53
exit -6022
!
@LABEL 54
exit -6023
!
@LABEL 59
exit -6019
!
! Hang up the modem
!
@HANGUP
@LABEL 60
settries 0
HSReset 0 0 0 0 0 0
@LABEL 61
write "ATH\13"
matchclr
matchstr 1 62 "NO CARRIER\13\10"
matchstr 2 62 "OK\13\10"
matchstr 3 62 "ERROR\13\10"
matchread 30
inctries
iftries 3 62
! no response, try escape sequence
pause 12
write "+++"
matchclr
matchstr 1 61 "OK\13\10"
matchread 18
! try dropping DTR
DTRClear
pause 15
DTRSet
pause 15
jump 61
!
@LABEL 62
! recall the factory settings
pause 15
write "AT&F1\13"
matchclr
matchstr 1 63 "OK\13\10"
matchread 30
!
@LABEL 63
pause 5
matchstr 1 64 "OK\13\10"
write "ATS0=0\13"
matchread 20
!
@LABEL 64
exit 0